package cn.torna.service;

import cn.torna.dao.entity.ProjectDeriveDoc;
import cn.torna.dao.entity.ShareContent;
import cn.torna.dao.mapper.ProjectDeriveDocMapper;
import cn.torna.dao.mapper.ShareContentMapper;
import com.gitee.fastmybatis.core.support.BaseLambdaService;
import com.sun.org.apache.bcel.internal.generic.RET;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tanghc
 */
@Service
public class ProjectDeriveDocService extends BaseLambdaService<ProjectDeriveDoc, ProjectDeriveDocMapper> {

    public List<ProjectDeriveDoc> getList(Long projectId, Long moduleId) {
        List<ProjectDeriveDoc> list = this.list(query().eq(ProjectDeriveDoc::getProjectId, projectId).eq(moduleId != null && moduleId > 0, ProjectDeriveDoc::getModuleId, moduleId));
        return list;
    }
}
